package com.canqiang.docadvice;

import java.util.List;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

public class PatientOutCaseTimeAdapter extends ArrayAdapter<PatientOutCaseTime>{
	private LayoutInflater mInflater;
	public PatientOutCaseTimeAdapter(Context context, int textViewResourceId,
			List<PatientOutCaseTime> objects) {
		super(context, textViewResourceId, objects);
		// TODO Auto-generated constructor stub
		this.mInflater = LayoutInflater.from(context);
	}
	@Override  
    public View getView(int position, View convertView, ViewGroup parent) {
		if(convertView == null){ 
			convertView= mInflater.inflate(R.layout.patientoutcasetime,null);
		}
		PocHolder holder=null;
		PatientOutCaseTime p=getItem(position);
		if(holder==null){
			holder=new PocHolder();
			holder.title=(TextView) convertView.findViewById(R.id.caseouttime);
			convertView.setTag(holder);
		}
		else{
			holder=(PocHolder)convertView.getTag();
		}
		holder.title.setText(p.getIntime());
		return convertView;
	}
	private static class PocHolder{
		TextView title;
	}

}
